<div class="layui-fluid">
	<div class="layui-row layui-col-space15">
		<div class="layui-col-md4">
			<div class="layui-card">
				<div class="layui-card-header">
					今日新增用户
					<span class="layui-badge layui-bg-blue layuiadmin-badge">日</span>
				</div>
				<div class="layui-card-body layuiadmin-card-list">
					<p class="layuiadmin-big-font">{$user_count['today']}</p>
					<p>
						昨日
						<span class="layuiadmin-span-color">{$user_count['yesterday']}<i class="layui-inline layui-icon layui-icon-user"></i></span>
					</p>
				</div>
			</div>
		</div>
		<div class="layui-col-md4">
			<div class="layui-card">
				<div class="layui-card-header">
					本周新增用户
					<span class="layui-badge layui-bg-blue layuiadmin-badge">周</span>
				</div>
				<div class="layui-card-body layuiadmin-card-list">
					<p class="layuiadmin-big-font">{$user_count['week']}</p>
					<p>
						本月
						<span class="layuiadmin-span-color">{$user_count['month']} <i class="layui-inline layui-icon layui-icon-user"></i></span>
					</p>
				</div>
			</div>
		</div>
		<div class="layui-col-md4">
			<div class="layui-card">
				<div class="layui-card-header">
					用户总数
					<span class="layui-badge layui-bg-green layuiadmin-badge">总</span>
				</div>
				<div class="layui-card-body layuiadmin-card-list">
					<p class="layuiadmin-big-font">{$user_count['total']}</p>
					<p>
						当前时间
						<span class="layuiadmin-span-color">{:date('Y-m-d H:i:s')} <i class="layui-inline layui-icon layui-icon-time"></i></span>
					</p>
				</div>
			</div>
		</div>
		<div class="layui-col-md6">
			<div class="layui-card">
				<div class="layui-card-header">意见反馈</div>
				<div class="layui-card-body">
					<ul class="layuiadmin-card-status layuiadmin-home2-usernote">
						{if condition="$feedback->isEmpty()"}
							<li>
								<h3>暂无更多数据</h3>
								<p>所有意见反馈均已处理</p>
							</li>
						{else/}
							{volist name="feedback" id="v"}
								<li>
									<h3>{$v.name}</h3>
									<p>{$v.content}</p>
									<span>{$v.create_time}</span>
									<a href="javascript:;" data-id="{$v.id}" class="layui-btn layui-btn-xs layuiadmin-reply deal-feedback">标记为已读</a>
								</li>
							{/volist}
						{/if}
					</ul>
				</div>
			</div>
		</div>
		<div class="layui-col-md6">
			<div class="layui-card">
				<div class="layui-card-header">系统信息</div>
				<div class="layui-card-body layui-text">
					<table class="layui-table">
						<colgroup>
							<col width="150" height="120">
							<col>
						</colgroup>
						<tbody>
						<tr>
							<td>上次登录时间</td>
							<td>{$access_admin['last_date']}</td>
						</tr>
						<tr>
							<td>上次登录IP地址</td>
							<td>{$access_admin['last_ip']}</td>
						</tr>
						<tr>
							<td>当前系统域名</td>
							<td>{$_SERVER['REQUEST_SCHEME']}://{$_SERVER['HTTP_HOST']}</td>
						</tr>
						<tr>
							<td>运行环境</td>
							<td>{$_SERVER["SERVER_SOFTWARE"]}</td>
						</tr>
						</tbody>
					</table>
				</div>
			</div>
		</div>
		<!--<div class="layui-col-md6">
			<div class="layui-card">
				<div class="layui-card-header">
					最近更新
				</div>
				<div class="layui-card-body">
					<div class="layui-row layui-col-space10">
						<div class="layui-col-xs12 layui-col-sm4">
							<div class="layuiadmin-card-text">
								<div class="layui-text-top"><i class="layui-icon layui-icon-water"></i><a lay-href="https://www.layui.com/doc/modules/flow.html">flow</a></div>
								<p class="layui-text-center">修复开启 isLazyimg:true 后, 图片懒加载但是图片不存在的报错问题</p>
								<p class="layui-text-bottom"><a lay-href="https://www.layui.com/doc/modules/flow.html">流加载</a><span>7 天前</span></p>
							</div>
						</div>
						<div class="layui-col-xs12 layui-col-sm4">
							<div class="layuiadmin-card-text">
								<div class="layui-text-top"><i class="layui-icon layui-icon-upload-circle"></i><a lay-href="https://www.layui.com/doc/modules/upload.html">upload</a></div>
								<p class="layui-text-center">修复开启 size 参数后，文件超出规定大小时，提示信息有误的问题</p>
								<p class="layui-text-bottom"><a lay-href="https://www.layui.com/doc/modules/upload.html">文件上传</a><span>7 天前</span></p>
							</div>
						</div>
						<div class="layui-col-xs12 layui-col-sm4">
							<div class="layuiadmin-card-text">
								<div class="layui-text-top"><i class="layui-icon layui-icon-form"></i><a lay-href="https://www.layui.com/doc/modules/form.html#val">form</a></div>
								<p class="layui-text-center">增加 form.val(filter, fields)方法，用于给指定表单集合的元素初始赋值</p>
								<p class="layui-text-bottom"><a lay-href="https://www.layui.com/doc/modules/form.html">表单</a><span>7 天前</span></p>
							</div>
						</div>
						<div class="layui-col-xs12 layui-col-sm4">
							<div class="layuiadmin-card-text">
								<div class="layui-text-top"><i class="layui-icon layui-icon-form"></i><a lay-href="https://www.layui.com/doc/modules/form.html">form</a></div>
								<p class="layui-text-center">对 select 组件新增上下键（↑ ↓）回车键（Enter）选择功能</p>
								<p class="layui-text-bottom"><a lay-href="https://www.layui.com/doc/modules/form.html">表单</a><span>7 天前</span></p>
							</div>
						</div>
						<div class="layui-col-xs12 layui-col-sm4">
							<div class="layuiadmin-card-text">
								<div class="layui-text-top"><i class="layui-icon layui-icon-form"></i><a lay-href="https://www.layui.com/doc/modules/form.html">form</a></div>
								<p class="layui-text-center">优化 switch 开关组件，让其能根据文本自由伸缩宽</p>
								<p class="layui-text-bottom"><a lay-href="https://www.layui.com/doc/modules/form.html">表单</a><span>7 天前</span></p>
							</div>
						</div>
						<div class="layui-col-xs12 layui-col-sm4">
							<div class="layuiadmin-card-text">
								<div class="layui-text-top"><i class="layui-icon layui-icon-form"></i><a lay-href="https://www.layui.com/doc/modules/form.html">form</a></div>
								<p class="layui-text-center">修复 checkbox 复选框组件在高分辨屏下出现的样式不雅问题</p>
								<p class="layui-text-bottom"><a lay-href="https://www.layui.com/doc/modules/form.html">表单</a><span>7 天前</span></p>
							</div>
						</div>
					</div>
				</div>
			</div>
		</div>-->
	</div>
</div>

<script>
	layui.use(['index','admin'], function () {
		const $ = layui.$;
		const admin = layui.admin;

		$('.deal-feedback').click(function(){
			const id = $(this).data('id');
			admin.req({
				url: "{:url('feedback/dealFeedback')}",
				data: {
					idarr:[id]
				},
				success: function (res) {
					location.reload();
				}
			});
		});
	});
</script>
